package com.cloudfun.campusshare.entity;

import com.cloudfun.campusshare.annotation.ImageSetUrl;
import com.cloudfun.campusshare.common.constant.*;
import com.cloudfun.campusshare.common.model.vo.ImageVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @Author : linyangping
 * @Date : Created in 4:40 PM 2019/11/6
 */
@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "auth_org")
public class AuthOrgEntity extends BaseEntity {

    @Id
    @GenericGenerator(name = "id_uuid", strategy = "uuid")
    @GeneratedValue(generator = "id_uuid")
    @Column(name = "id", unique = true, columnDefinition = ("varchar(40) not null comment '主键uuid'"))
    private String id;

//    /**
//     * 此字段仅限于提交时的状态值
//     */
//    @Column(name = "page_no", unique = true, columnDefinition = ("int(11) not null comment '当前页面地址提交和'"))
//    private Integer pageNo=0;

    @ApiModelProperty(value = "法人姓名")
    @Column(name = "name", columnDefinition = ("varchar(40) not null comment '法人姓名'"))
    private String name;

    @ApiModelProperty(value = "法人身份证号码")
    @Column(name = "id_num", columnDefinition = ("varchar(40) not null comment '法人身份证号码'"))
    private String idNum;

    @ApiModelProperty(value = "用户id")
    @Column(unique = true, name = "user_id", columnDefinition = ("varchar(40) not null comment '用户id'"))
    private String userId;

    @ApiModelProperty(value = "企业名称")
    @Column(name = "org_name", columnDefinition = ("varchar(40) default null comment '企业名称'"))
    private String orgName;

    @ApiModelProperty(value = "企业地址")
    @Column(name = "org_addr", columnDefinition = ("varchar(40) default null comment '企业地址'"))
    private String orgAddr;

    @ApiModelProperty(value = "详细地址")
    @Column(name = "detail_addr", columnDefinition = ("varchar(255) default null comment '详细地址'"))
    private String detailAddr;

    @ApiModelProperty(value = "社会信用代码")
    @Column(name = "social_code", columnDefinition = ("varchar(40) default null comment '社会信用代码'"))
    private String socialCode;

    @ApiModelProperty(value = "银行账户名称")
    @Column(name = "bank_account", columnDefinition = ("varchar(40) default null comment '银行账户名称'"))
    private String bankAccount;

    @ApiModelProperty(value = "银行账号")
    @Column(name = "bank_account_name", columnDefinition = ("varchar(40) default null comment '银行账号'"))
    private String bankAccountName;

    @ApiModelProperty(value = "开户银行")
    @Column(name = "deposit_bank", columnDefinition = ("varchar(40) default null comment '开户银行'"))
    private String depositBank;

    @ApiModelProperty(value = "开户银行所在省")
    @Column(name = "bank_province", columnDefinition = ("varchar(40) default null comment '开户银行所在省'"))
    private String bankProvince;

    @ApiModelProperty(value = "开户银行所在市")
    @Column(name = "bank_city", columnDefinition = ("varchar(40) default null comment '开户银行所在市'"))
    private String bankCity;

    @ApiModelProperty(value = "开户银行支行")
    @Column(name = "deposit_sub_bank", columnDefinition = ("varchar(64) default null comment '开户银行支行'"))
    private String depositSubBank;

    @ApiModelProperty(value = "银行类别")
    @Column(name = "bank_card_category",columnDefinition = ("varchar(32) null comment '结算方式'"))
    @Enumerated(EnumType.STRING)
    private BankCardCategory bankCardCategory;

    @ApiModelProperty(value = "结果")
    @Column(columnDefinition = ("varchar(32) null comment '结果'"))
    @Enumerated(EnumType.STRING)
    private ApplicationResult result;

    @ApiModelProperty(value = "备注")
    @Column(columnDefinition = ("varchar(32) null comment '备注'"))
    private String remark;

    @ApiModelProperty(value = "邮箱")
    @Column(columnDefinition = ("varchar(32) null comment '邮箱'"))
    private String email;

    @ApiModelProperty(value = "手机号")
    @Column(columnDefinition = ("varchar(32) null comment '手机号'"))
    private String phone;

    @ApiModelProperty(value = "商户类型")
    @Column(columnDefinition = ("varchar(32) null comment '商户类型'"))
    @Enumerated(EnumType.STRING)
    private MerchantType merchantType;

    @ApiModelProperty(value = "门店名称")
    @Column(columnDefinition = ("varchar(32) null comment '门店名称'"))
    @Enumerated(EnumType.STRING)
    private StoreType storeType;

    @ApiModelProperty(value = "门店名称")
    @Column(name = "store_name", columnDefinition = ("varchar(64) default null comment '门店名称'"))
    private String storeName;

    @ApiModelProperty(value = "门店所在省")
    @Column(name = "store_province", columnDefinition = ("varchar(64) default null comment '门店所在省'"))
    private String storeProvince;

    @ApiModelProperty(value = "门店所在市")
    @Column(name = "store_city", columnDefinition = ("varchar(64) default null comment '门店所在市'"))
    private String storeCity;

    @ApiModelProperty(value = "门店所在区")
    @Column(name = "store_area", columnDefinition = ("varchar(64) default null comment '门店所在区'"))
    private String storeArea;

    @ApiModelProperty(value = "门店所在详细地址")
    @Column(name = "store_address", columnDefinition = ("varchar(64) default null comment '门店所在详细地址'"))
    private String storeAddress;

    @ApiModelProperty(value = "银行名称")
    @Column(name = "bank_name", columnDefinition = ("varchar(64) default null comment '银行名称'"))
    private String bankName;

    @ApiModelProperty(value = "银行支行号")
    @Column(name = "bank_branch_no", columnDefinition = ("varchar(64) default null comment '银行支行号'"))
    private String bankBranchNo;

    @ApiModelProperty(value = "开户用身份证")
    @Column(name = "bank_branch_idcard_no", columnDefinition = ("varchar(64) default null comment '开户用身份证'"))
    private String bankBranchIdcardNo;

    @ApiModelProperty(value = "开户身份证有效期")
    @Column(name = "bank_branch_idcard_end_time", columnDefinition = ("varchar(64) default null comment '开户身份证有效期'"))
    private String bankBranchIdcardEndTime;

    @ApiModelProperty(value = "法人身份证有效期")
    @Column(name = "idcard_end_time", columnDefinition = ("text default null comment '法人身份证有效期'"))
    private String idcardEndTime;

    @ApiModelProperty(value = "营业执照有效期")
    @Column(name = "license_end_time", columnDefinition = ("text default null comment '营业执照有效期'"))
    private String licenseEndTime;

    @ApiModelProperty(value = "手持银行卡照片")
    @Column(name = "holding_bank_photo", columnDefinition = ("text default null comment '手持银行卡照片'"))
    private String holdingBankPhoto;

    @ApiModelProperty(value = "银行卡照片")
    @Column(name = "bank_card_photo", columnDefinition = ("text default null comment '银行卡照片'"))
    private String bankCardPhoto;

    @ApiModelProperty(value = "手持开户身份证照片")
    @Column(name = "bank_holding_id_card_photo", columnDefinition = ("text default null comment '手持开户身份证照片'"))
    private String bankHoldingIdCardPhoto;

    @ApiModelProperty(value = "开户身份证正面照片")
    @Column(name = "bank_card_front_photo", columnDefinition = ("text default null comment '开户身份证正面照片'"))
    private String bankCardFrontPhoto;

    @ApiModelProperty(value = "开户身份证背面照片")
    @Column(name = "bank_card_back_photo", columnDefinition = ("text default null comment '开户身份证背面照片'"))
    private String bankCardBackPhoto;

    @ApiModelProperty(value = "法人手持身份证照片")
    @Column(name = "legal_holding_card_photo", columnDefinition = ("text default null comment '法人手持身份证照片'"))
    private String legalHoldingCardPhoto;

    @ApiModelProperty(value = "法人身份证正面照片")
    @Column(name = "legal_person_id_card_front_photo", columnDefinition = ("text default null comment '法人身份证正面照片'"))
    private String legalPersonIdCardFrontPhoto;

    @ApiModelProperty(value = "法人身份证背面照片")
    @Column(name = "legal_person_id_card_back_photo", columnDefinition = ("text default null comment '法人身份证背面照片'"))
    private String legalPersonIdCardBackPhoto;

    @ApiModelProperty(value = "营业执照照片")
    @Column(name = "business_license_photo", columnDefinition = ("text default null comment '营业执照照片'"))
    private String businessLicensePhoto;

    @ApiModelProperty(value = "门头照")
    @Column(name = "door_photo", columnDefinition = ("text default null comment '门头照'"))
    private String doorPhoto;

    @ApiModelProperty(value = "内景照")
    @Column(name = "store_interior_photos", columnDefinition = ("text default null comment '内景照'"))
    private String storeInteriorPhotos;

    @ApiModelProperty(value = "场地租用合同文件")
    @Column(name = "photo_of_lease_contract_document", columnDefinition = ("text default null comment '场地租用合同文件'"))
    private String photoOfLeaseContractDocument;

    @ApiModelProperty(value = "其他资料")
    @Column(name = "other_information", columnDefinition = ("text default null comment '其他资料'"))
    private String otherInformation;

    @ApiModelProperty(value = "运营商名称")
    @Transient
    private String userName;

    @ApiModelProperty(value = "快捷通审核状态")
    @Transient
    private KjtAuditStatus kjtAuditStatus;
}
